package com.arcsoft.commonbase.ext

import java.math.BigDecimal

// 除以1000000
fun Long.div6Scale(): Double {
    val b1 = BigDecimal(this.toString())
    val b2 = BigDecimal("1000000")
    return b1.divide(b2, 6, BigDecimal.ROUND_DOWN).toDouble()
}

fun String.removeColon():String {
    return this.replace(":", "")
}

fun String?.defaultText():String {
     if (this.isNullOrEmpty()) {
         return "--"
    }
    return this
}
